<?php

class CPageCustom extends CPageBase {
	public function showPage($curPage,$pageSize,$rowCount)
	{
		$pageUrl = $this->pageInfo($curPage,$pageSize,$rowCount);
		/*if($pageUrl["pageTotal"]==1)
		{
			return "";
		}*/
		
		$pageStr = "<div class='page'>";
		
		$firstPageInfo = $pageUrl["firstPageInfo"];
		$priPageInfo = $pageUrl["priPageInfo"];
		$nextPageInfo = $pageUrl["nextPageInfo"];
		$lastPageInfo = $pageUrl["lastPageInfo"];
		
		$pageStr .= $this->s($priPageInfo["enabled"],$priPageInfo["page"],"上一页");
		$pageStr .= $this->s($nextPageInfo["enabled"],$nextPageInfo["page"],"下一页");
		
		return $pageStr."</div>";
	}
	
	private function s($e,$p,$s)
	{
		if($e)
		{
			return "<a href='".$this->getPageUrl($p)."'>".$s."</a>";
		}
		else
		{
			return "<a style='color:#999999;' href='javascript:void(0);'>".$s."</a>";
		}
	}
}

?>